package prototech.ahedra.model;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbCon {

	public static Connection getConnection() {
		  Connection ccon = null;
		  try{
			  Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			
			  String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
			  "databasename=ahedra;user=sa;password=mithrandir;";
				
			  ccon = DriverManager.getConnection(connectionUrl);
		  } catch (ClassNotFoundException e) {
			  e.printStackTrace();
		  } catch (SQLException e) {
			e.printStackTrace();
		  }
		  return ccon;
	}
}
